package top.lixunda.commerce.common.core.controller.wrapper;

import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author LiXunda
 * @version time:2019/10/15 20:10
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class EntityUpdateWrapper<T> {

    private T entity;

    private BaseDataUpdateSqlWrapper<T> wrapper;

    public UpdateWrapper<T> toUpdateWrapper(){
        return wrapper == null ? null : wrapper.toUpdateWrapper();
    }

}
